﻿@using AntDesign.TestApp.Client.Pages
@inherits LayoutComponentBase
@inject ReuseTabsService ReuseTabsService;

<Layout Style="height: 100vh;">
    <Sider Collapsible Collapsed=@collapsed NoTrigger>
        <div class="logo" />
        <NavMenu />
    </Sider>
    <Layout>
        <Header>
            <Button Shape="@ButtonShape.Circle" Icon="@IconType.Outline.Reload" OnClick="Reload" />
            <LoginDisplay />
            <a href="https://docs.microsoft.com/aspnet/" target="_blank">About</a>
        </Header>
        <Content>
            <div>
                <ReuseTabs Draggable Size="TabSize.Small" />
    @*             <AuthorizeView>
                    <Authorized>
                        <ReuseTabs Draggable Size="TabSize.Small" />
                    </Authorized>
                    <NotAuthorized>
                        @Body
                    </NotAuthorized>
                </AuthorizeView> *@
            </div>
        </Content>
        <Footer>Footer</Footer>
    </Layout>
</Layout>

@code
{
    bool collapsed;

    void toggle()
    {
        collapsed = !collapsed;
    }

    public void Reload()
    {
        ReuseTabsService.ReloadPage();
    }

}